<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>JODConverter Sample - Spring Boot Starter</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

    <link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>

</head>

<body th:attr="onload=${errorMessage != null &amp;&amp; errorMessage != ''} ? 'showError(\'__${errorMessage}__\')' : null">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <div class="container">
        <a class="navbar-brand" href="https://github.com/jodconverter/jodconverter">JODConverter</a>
    </div>
</nav>

<div class="container my-5">

    <div class="text-center mb-4">
        <a href="https://github.com/jodconverter/jodconverter">
            <img alt="JODConverter" src="/img/jodconverter_w250.png"/>
        </a>
    </div>

    <h3>Sample
        <small class="h5 text-body-secondary">Spring Boot Starter</small>
    </h3>

    <hr class="mb-4"/>

    <div id="errorMessage"></div>

    <div class="card">
        <h4 class="card-header">Convert Documents</h4>
        <div class="card-body">

            <form action="/converter" enctype="multipart/form-data" method="post">

                <div class="mb-3">
                    <label for="inputFile" class="form-label">Document</label>
                    <input id="inputFile" name="inputFile" class="form-control" type="file" onchange="onInputFileChange()">
                </div>

                <div class="mb-3">
                    <label for="outputFormat" class="form-label">Convert as type</label>
                    <select id="outputFormat" name="outputFormat" class="form-select" disabled>
                        <option>Choose type</option>
                    </select>
                </div>

                <button id="formGo" type="submit" class="btn btn-primary" disabled>Convert!</button>

            </form>
        </div>

    </div>

</div>

<script type="text/javascript" src="/lib/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/documentFormats.js"></script>
<script type="text/javascript" src="/js/converter.js"></script>

</body>
</html>
